import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import './common.css';
import 'antd/dist/antd.min.css'
import App from './App';
import * as serviceWorker from './serviceWorker';
import { HashRouter, BrowserRouter, Switch, Redirect,Route } from 'react-router-dom'
// import Route from './route'
import Login from './components/login/login.js'
import { Provider } from 'react-redux'
import store from './store'

ReactDOM.render(
  <Provider store={store}>
    <BrowserRouter>
      <Switch>
        <Route path='/login' component={Login}></Route>
        <Redirect path='/' exact to='/org'></Redirect>
        <Route path='/org' component={App}></Route>
        <Route path='/custorm' component={App}></Route>
        <Route path='/*' render={() => <h1>404</h1>}></Route>
      </Switch>


    </BrowserRouter>
  </Provider>,
  document.getElementById('root')
);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
